<% if @cultural_heritage_cultural_heritages.size > 0 %>

<table class="paginated_table sorted_table">
  <thead>
    <tr>
      <th>Código</th>
      <th>Patrimonio Inmueble</th>
      <th>Estado</th>
      <th>Periodo</th>
      <th>Cultura</th>
      <th>Tipología</th>
      <th style="min-width: 110px">Acciones</th>
    </tr>
</thead>
<tbody>
<% @cultural_heritage_cultural_heritages.each do |cultural_heritage_cultural_heritage| %>
  <tr>
    <td><%= cultural_heritage_cultural_heritage.nationalRegistrationCode %></td>
    <td><%= cultural_heritage_cultural_heritage.name %></td>
    <td><%= cultural_heritage_cultural_heritage.str_state %></td>
    <td><%= cultural_heritage_cultural_heritage.str_period %> </td>
    <td><%= cultural_heritage_cultural_heritage.str_culture %> </td>
    <td>
    <%if !cultural_heritage_cultural_heritage.tipology.blank?%>
      <%= cultural_heritage_cultural_heritage.obj_tipology.name %>
    <%end%>
    </td>  
    <td>
    <%= link_to image_tag("navi/search-16-ns.png", :border => 0, :title => 'Mostrar'), :controller=>"/cultural_heritage/cultural_heritage_properties", :action=>"show", :id=>cultural_heritage_cultural_heritage.id %>
      <% if (user_signed_in? && ([1,2,4].include?(current_user.role))) %>
        <%= link_to image_tag("navi/pencil-16-ns.png", :border => 0, :title => 'Editar'), :controller=>"/cultural_heritage/cultural_heritage_properties", :action=>"edit", :id=>cultural_heritage_cultural_heritage.id %>
        <%= link_to image_tag("navi/cross-16-ns.png", :border => 0, :title => 'Eliminar'), {:controller=>"/cultural_heritage/cultural_heritage_properties",:action => "delete",:id => cultural_heritage_cultural_heritage.id} ,{:confirm => 'Esta seguro?'}%>
        <%= link_to image_tag("navi/badge-square-check-16-ns.png", :border => 0, :title => 'Asignar'),:controller=>"/cultural_heritage/cultural_heritage_properties", :action=>"assing", :id=>cultural_heritage_cultural_heritage.id %>
      <%end%>
    </td>
  </tr>
<% end %>
    </tbody>
</table>
<% else %>
  <p>Ningun Patrimonio Cultural Encontrado</p>
<% end %>